<!DOCTYPE html>


<html lang="zh-CN">


<head>
  <meta charset="utf-8" />
    
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>
    02.Dbeaver功能强大还免费.md |  
  </title>
  <meta name="generator" content="hexo-theme-ayer">
  
  <link rel="shortcut icon" href="/favicon.ico" />
  
  
<link rel="stylesheet" href="/dist/main.css">

  
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/css/remixicon.min.css">

  
<link rel="stylesheet" href="/css/custom.css">

  
  
<script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>

  
  

  

</head>

</html>

<body>
  <div id="app">
    
      
    <main class="content on">
      <section class="outer">
  <article
  id="post-mysql/02.Dbeaver功能强大还免费"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  02.Dbeaver功能强大还免费.md
</h1>
 

    </header>
     
    <div class="article-meta">
      <a href="/2020/11/11/mysql/02.Dbeaver%E5%8A%9F%E8%83%BD%E5%BC%BA%E5%A4%A7%E8%BF%98%E5%85%8D%E8%B4%B9/" class="article-date">
  <time datetime="2020-11-10T16:00:00.000Z" itemprop="datePublished">2020-11-11</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/mysql/">mysql</a>
  </div>
  
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> 字数统计:</span>
            <span class="post-count">1.5k</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> 阅读时长≈</span>
            <span class="post-count">5 分钟</span>
        </span>
    </span>
</div>
 
    </div>
      
    <div class="tocbot"></div>




  
    <div class="article-entry" itemprop="articleBody">
       
  <h1 id="Dbeaver功能强大还免费"><a href="#Dbeaver功能强大还免费" class="headerlink" title="Dbeaver功能强大还免费"></a>Dbeaver功能强大还免费</h1><p>上一篇：<a target="_blank" rel="noopener" href="http://mp.weixin.qq.com/s?__biz=MzIzNjM3MDEyMg==&mid=2247491345&idx=1&sn=b32c68a95116e55d5d8d0f0e375743eb&chksm=e8d9beb4dfae37a2ec7bf9758e6895ea7cbf667cd49abd8f190c5d9561900a54b5fe414f86a6&scene=21#wechat_redirect">这样规范写代码，同事直呼“666”</a></p>
<p>DBeaver 是一个基于 Java 开发，免费开源的通用数据库管理和开发工具，使用非常友好的 ASL 协议。可以通过官方网站或者 Github 进行下载。</p>
<p>由于 DBeaver 基于 Java 开发，可以运行在各种操作系统上，包括：Windows、Linux、macOS 等。DBeaver 采用 Eclipse 框架开发，支持插件扩展，并且提供了许多数据库管理工具：ER 图、数据导入/导出、数据库比较、模拟数据生成等。</p>
<p>DBeaver 通过 JDBC 连接到数据库，可以支持几乎所有的数据库产品，包括：MySQL、PostgreSQL、MariaDB、SQLite、Oracle、Db2、SQL Server、Sybase、MS Access、Teradata、Firebird、Derby 等等。商业版本更是可以支持各种 NoSQL 和大数据平台：MongoDB、InfluxDB、Apache Cassandra、Redis、Apache Hive 等。</p>
<h3 id="下载与安装"><a href="#下载与安装" class="headerlink" title="下载与安装"></a>下载与安装</h3><p>DBeaver 社区版可以通过官方网站或者 Github 进行下载。两者都为不同的操作系统提供了安装包或者解压版，可以选择是否需要同时安装 JRE。另外，官方网站还提供了 DBeaver 的 Eclipse 插件，可以在 Eclipse 中进行集成。</p>
<p>DBeaver 支持中文，安装过程非常简单，不多说，唯一需要注意的是 DBeaver 的运行依赖于 JRE。不出意外，安装完成后运行安装目录下的 dbeaver.exe 可以看到以下界面（Windows 10）：</p>
<p><img src=""></p>
<p>这个界面其实是新建数据库连接，我们可以看到它支持的各种数据平台；先点击“取消”按钮，进入主窗口界面。</p>
<p>此时，它会提示我们是否建立一个示例数据库。</p>
<p><img src=""></p>
<p>如果点击“是(Y)”，它会创建一个默认的 SQLite 示例数据库。下图是它的主窗口界面。</p>
<p><img src=""></p>
<p>DBeaver 和我们常用的软件类似，最上面是菜单项和快捷工具，左侧是已经建立的数据库连接和项目信息，右侧是主要的工作区域。</p>
<h3 id="连接数据库"><a href="#连接数据库" class="headerlink" title="连接数据库"></a>连接数据库</h3><p>打开 DBeaver 之后，首先要做的就是创建数据库连接。可以通过菜单“数据库” -&gt; “新建连接”打开新建连接向导窗口，也就是我们初次运行 DBeaver 时弹出的窗口。</p>
<p><img src=""></p>
<p>我们以 PostgreSQL 为例，新建一个数据库连接。选择 PostgreSQL 图标，点击“下一步(N)”。</p>
<p><img src=""></p>
<p>然后是设置数据库的连接信息：主机、端口、数据库、用户、密码。“Advanced settings”高级设置选项可以配置 SSH、SSL 以及代理等，也可以为连接指定自己的名称和连接类型（开发、测试、生产）。</p>
<p>点击最下面的“测试链接(T)”可以测试连接配置的正确性。初次创建某种数据库的连接时，会提示下载相应的 JDBC 驱动。</p>
<p><img src=""></p>
<p>它已经为我们查找到了相应的驱动，只需要点击“下载”即可，非常方便。下载完成后，如果连接信息正确，可以看到连接成功的提示。</p>
<p><img src=""></p>
<p>确认后完成连接配置即可。左侧的数据库导航中会增加一个新的数据库连接。</p>
<p>由于某些数据库（例如 Oracle、Db2）的 JDBC 驱动需要登录后才能下载，因此可以使用手动的方式进行配置。选择菜单“数据库” -&gt; “驱动管理器”。</p>
<p><img src=""></p>
<p>选择 Oracle ，点击“编辑(E)…”按钮。</p>
<p>搜索顶级架构师公众号回复“offer”，送你一份算法面试题和答案惊喜礼包。</p>
<p><img src=""></p>
<p>通过界面提示的网址，手动下载 Oracle 数据库的 JDBC 驱动文件，例如 ojdbc8.jar。然后点击“添加文件(F)”按钮，选择并添加该文件。</p>
<p><img src=""></p>
<p>下次建立 Oracle 数据库连接时即可使用该驱动。</p>
<p>新建连接之后，就可以通过这些连接访问相应的数据库，查看和编辑数据库中的对象，执行 SQL 语句，完成各种管理和开发工作。<br><img src=""></p>
<h3 id="生成-ER-图"><a href="#生成-ER-图" class="headerlink" title="生成 ER 图"></a>生成 ER 图</h3><p>最后介绍一下如何生成数据库对象的 ER 图。点击窗口左侧“数据库导航”旁边的“项目”视图。</p>
<p><img src=""></p>
<p>其中有个“ER Diagrams”，就是实体关系图。右击该选项，点击“创建新的 ER 图”。</p>
<p><img src=""></p>
<p>输入一个名称并选择数据库连接和需要展示的对象，然后点击“完成”，即可生成相应的 ER 图。<br><img src=""></p>
<p>ER 图可以进行排版和显示设置，也支持打印为图片。DBeaver 目前还不支持自己创建 ER 图，只能从现有的数据库中生成。</p>
<p>对于图形工具，很多功能我们都可以自己去使用体会；当然，DBeaver 也提供了用户指南，自行参考。</p>
<h3 id="扩展链接"><a href="#扩展链接" class="headerlink" title="扩展链接"></a>扩展链接</h3><p>官方网站</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://dbeaver.io/">https://dbeaver.io/</a></li>
</ul>
<p>GitHub</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://github.com/dbeaver/dbeaver/">https://github.com/dbeaver/dbeaver/</a></li>
</ul>
<p>用户指南</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://github.com/dbeaver/dbeaver/wiki">https://github.com/dbeaver/dbeaver/wiki</a></li>
</ul>
<p><img src=""></p>
<p>公众号后台回复【架构】或者【架构整洁】有惊喜礼包！</p>
<p><strong>架构师交流群</strong></p>
<p> <strong>「顶级架构师」建立了读者架构师交流群，大家可以添加小编微信进行加群</strong></p>
<p><img src=""></p>
<p>扫描添加好友邀你进架构师群，加我时注明<strong>【**</strong>姓名+公司+职位】**</p>
<p><strong>版权申明：内容来源网络，版权归原作者所有。如有侵权烦请告知，我们会立即删除并表示歉意。谢谢。</strong></p>
<p>猜你还想看</p>
<p><a target="_blank" rel="noopener" href="http://mp.weixin.qq.com/s?__biz=MzIzNjM3MDEyMg==&mid=2247491322&idx=2&sn=778694bda9ca49e43e92d49a32af072d&chksm=e8d9bf5fdfae36499ed8bdf3ced2041f5e1fc7ca2cd87fcce3d446d64277e23ae23e9da59a0d&scene=21#wechat_redirect">万字长文！Spring 容器的启动过程，看这篇就够了！</a><br><a target="_blank" rel="noopener" href="http://mp.weixin.qq.com/s?__biz=MzIzNjM3MDEyMg==&mid=2247491345&idx=2&sn=b9567fa358dd19564eafdab55b331152&chksm=e8d9beb4dfae37a2d3cd789743817d512b2794138c7e06be4a7901227d8d58e763d66c1539da&scene=21#wechat_redirect">求求你别再用offset和limit分页了</a><br><a target="_blank" rel="noopener" href="http://mp.weixin.qq.com/s?__biz=MzIzNjM3MDEyMg==&mid=2247491220&idx=2&sn=d2101920d9d4f7f5958c541885685f7f&chksm=e8d9bf31dfae3627429859a8c3fe7fdc03aa255fb8738be10ecb24e808547c368f04afb644ee&scene=21#wechat_redirect">就是要让你搞懂Nginx，这篇就够了！</a><br><a target="_blank" rel="noopener" href="http://mp.weixin.qq.com/s?__biz=MzIzNjM3MDEyMg==&mid=2247491285&idx=2&sn=5faeb5bd30d88cc46fdbedc91a75e97a&chksm=e8d9bf70dfae3666baf8dc1e015ce65429ece13077c376b46625e84399a890b0e994643a1054&scene=21#wechat_redirect">Spring Boot 整合 Quartz 实现 Java 定时任务的动态配置</a>  </p>
<p><img src=""></p>
<p>长按识别图片二维码关注，订阅更多精彩</p>
<p>顶级架构师，企业架构、系统架构、网站架构、大规模分布式架构、高可用架构等架构讨论，以及结合互联网技术的架构调整。欢迎有想法、乐于分享的架构师交流学习</p>
 
      <!-- reward -->
      
      <div id="reword-out">
        <div id="reward-btn">
          打赏
        </div>
      </div>
      
    </div>
    

    <!-- copyright -->
    
    <div class="declare">
      <ul class="post-copyright">
        <li>
          <i class="ri-copyright-line"></i>
          <strong>版权声明： </strong>
          
          本博客所有文章除特别声明外，著作权归作者所有。转载请注明出处！
          
        </li>
      </ul>
    </div>
    
    <footer class="article-footer">
       
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=http://example.com/2020/11/11/mysql/02.Dbeaver%E5%8A%9F%E8%83%BD%E5%BC%BA%E5%A4%A7%E8%BF%98%E5%85%8D%E8%B4%B9/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>  
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/mysql/" rel="tag">mysql</a></li></ul>

    </footer>
  </div>

   
  <nav class="article-nav">
    
      <a href="/2020/11/11/mysql/%E5%9B%BE%E8%A7%A3MySQL%E9%87%8C%E7%9A%84%E5%90%84%E7%A7%8D%20JOIN/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            图解MySQL里的各种 JOIN.md
          
        </div>
      </a>
    
    
      <a href="/2020/11/11/tips/6%20%E4%B8%AAJVM%E6%80%A7%E8%83%BD%E7%9B%91%E6%8E%A7%E3%80%81%E8%B0%83%E4%BC%98%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E8%AF%A6%E8%A7%A3/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">6 个JVM性能监控、调优工具使用详解.md</div>
      </a>
    
  </nav>

   
<!-- valine评论 -->
<div id="vcomments-box">
  <div id="vcomments"></div>
</div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js"></script>
<script>
  new Valine({
    el: "#vcomments",
    app_id: "",
    app_key: "",
    path: window.location.pathname,
    avatar: "monsterid",
    placeholder: "给我的文章加点评论吧~",
    recordIP: true,
  });
  const infoEle = document.querySelector("#vcomments .info");
  if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
    infoEle.childNodes.forEach(function (item) {
      item.parentNode.removeChild(item);
    });
  }
</script>
<style>
  #vcomments-box {
    padding: 5px 30px;
  }

  @media screen and (max-width: 800px) {
    #vcomments-box {
      padding: 5px 0px;
    }
  }

  #vcomments-box #vcomments {
    background-color: #fff;
  }

  .v .vlist .vcard .vh {
    padding-right: 20px;
  }

  .v .vlist .vcard {
    padding-left: 10px;
  }
</style>

 
     
</article>

</section>
      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2015-2020
        <i class="ri-heart-fill heart_icon"></i> TzWind
      </li>
    </ul>
    <ul>
      <li>
        
        
        
        由 <a href="https://hexo.io" target="_blank">Hexo</a> 强力驱动
        <span class="division">|</span>
        主题 - <a href="https://github.com/Shen-Yu/hexo-theme-ayer" target="_blank">Ayer</a>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>访问人数:<span id="busuanzi_value_site_uv"></span></s>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>浏览次数:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>
      <div class="float_btns">
        <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

<div class="todark" id="todark">
  <i class="ri-moon-line"></i>
</div>

      </div>
    </main>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="Hexo"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" target="_blank" rel="noopener" href="http://www.baidu.com">百度</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/friends">友链</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/2019/about">关于我</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="搜索">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <script>
      if (window.matchMedia("(max-width: 768px)").matches) {
        document.querySelector('.content').classList.remove('on');
        document.querySelector('.sidebar').classList.remove('on');
      }
    </script>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    
  </div>
</div>
    
<script src="/js/jquery-2.0.3.min.js"></script>


<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->


<script src="/js/tocbot.min.js"></script>

<script>
  tocbot.init({
    tocSelector: '.tocbot',
    contentSelector: '.article-entry',
    headingSelector: 'h1, h2, h3, h4, h5, h6',
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: 'main',
    positionFixedSelector: '.tocbot',
    positionFixedClass: 'is-position-fixed',
    fixedSidebarOffset: 'auto'
  });
</script>

<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->

<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css">
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script>

<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->


<script src="/js/busuanzi-2.3.pure.min.js"></script>


<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->


<link rel="stylesheet" href="/css/clipboard.css">

<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>


<!-- CanvasBackground -->


    
  </div>
</body>

</html>